﻿namespace _1_C_练习__008构造器
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Student student = new Student();
            Console.WriteLine(student.Name);
            Student student2 = new Student(001,"chengzi");
            Console.WriteLine((student2).GetType().Name);
        }
    }

    public class Student
    {
        //无参构造器
        public Student()
        {
            this.ID = 200234;
            this.Name = "lili";
            this.brith = "0926";
        }

        //带参默认构造器
        public Student(int ID,string Name )
        {
            this.ID=ID;
            this.Name=Name;
        }
        public int ID { get; set; }
        public string Name { get; set; }

        public string brith { get; set; }
    }
}
